mipv6: put the Binding Acknowledgement P flag at 0x20 - #1238
Open
adamgeorge309 wants to merge 1 commit into
Open
adamgeorge309 wants to merge 1 commit into
adamgeorge309 wants to merge 1 commit into
Conversation
The Proxy Mobile IPv6 (PMIPv6, RFC 5213) Proxy Registration (P) flag of a
Binding Acknowledgement was written into, and read back from, bit 0x40 of
the flags octet that follows the Status octet. 0x40 is the Mobile Router
(R) flag of the Network Mobility (NEMO) Basic Support Protocol, RFC 3963.
RFC 5213 Section 10 creates the Binding Acknowledgment Flags registry with
the Key Management Mobility Capability (K) flag at 0x80, R at 0x40 and P
at 0x20, and the message diagram of RFC 5213 Section 8.2 shows the same
order: |Status|K|R|P|Reserved|.
The serializer and the deserializer used the same wrong bit, so a round
trip agreed with itself and nothing inside a simulation changed. The octet
on the wire was wrong: Wireshark dissects the local mobility anchor's
Proxy Binding Acknowledgement as a NEMO message with the R flag set and
the P flag clear. In the other direction, a genuine NEMO acknowledgement
(0x40) was read as a proxy one, and the deserializer then read proxy
options that such a message does not carry.
To see it on master, capture the anchor's backhaul and dissect it:
cd examples/ipv6/pmipv6
inet -u Cmdenv -c General --sim-time-limit=12s \
'--*.lma.recordPcap=true' '--*.lma.pcapRecorder[0].pcapFile="lma.pcap"' \
'--**.fcsMode="computed"' '--**.crcMode="computed"' \
'--**.checksumMode="computed"'
tshark -r lma.pcap -Y mipv6
Frame 10, the Proxy Binding Acknowledgement, is listed as NEMO; its flags
octet is 0x40. With this commit it is listed as MIPv6 (Mobile IPv6) and
the octet is 0x20.
The Binding Update side was already right: RFC 5213 Section 10 assigns P
the bit 0x0200 in its 16-bit flags field, which is what the serializer
writes.
MobilityHeaderSerializer_1.test checks the octet against the RFC layout in
both directions, which a round-trip test cannot do.
One octet of every Proxy Binding Acknowledgement changes, so the
fingerprint of examples/ipv6/pmipv6 that hashes packet bytes (~tND) moves,
from bd46-d85c to db46-aa59. The fingerprint of event times, module paths,
message lengths and module-supplied extra data (tplx) and the one of event
times, node paths and message lengths of packets between nodes (~tNl) do
not move: no message length and no transmission time changed. The
statistical test of the example still passes.
Change: src.mipv6.MobilityHeaderSerializer | behavior.change.fix | fingerprint test whatsnew
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Proxy Mobile IPv6 (PMIPv6, RFC 5213) Proxy Binding Acknowledgement carries its Proxy Registration (P) flag at 0x20 of the flags octet, as RFC 5213 Section 10 assigns it. INET wrote and read it at 0x40, the Mobile Router (R) flag of the Network Mobility (NEMO) Basic Support Protocol, RFC 3963. The encode and decode pair agreed, so simulations were unaffected; the bytes on the wire were wrong.
Closes #1237
The problem
src/inet/networklayer/mipv6/MobilityHeaderSerializer.cc:186(serialize) and:318(deserialize):A capture of the local mobility anchor's backhaul in
examples/ipv6/pmipv6, dissected bytshark:0xC2 0x00(16 bits)0x400x20The Proxy Binding Update was already right: P = 0x0200 in its 16-bit flags field.
In the receive direction, a NEMO Binding Acknowledgement with the R flag set was decoded as a proxy one, and the deserializer then read proxy options that a NEMO message does not carry.
Architectural surface
Packet content only: the serialized position of one flag in the Binding Acknowledgement. No C++ interface, NED parameter, message field or feature descriptor changes.
Verification
Reproduction, before and after:
New unit test
tests/unit/MobilityHeaderSerializer_1.testcompares the octet with the RFC layout: a Proxy Binding Acknowledgement serializes its P flag to 0x20, a received 0x20 decodes as the P flag, and a received 0x40 does not. It fails on master and passes with the fix.All runs use a release build (
make MODE=releasein the root, thenmake MODE=releaseintests/module/lib,tests/unit/libandtests/serializer/lib); the test commands pass--no-build. Master has no Proxy Mobile IPv6 module test, and the Mobile IPv6 module tests send no Proxy Binding Acknowledgement, so the focused evidence is the new unit test and the/examples/ipv6/pmipv6/fingerprint row.Suites, each run on unmodified master (
49e1fa0945) and with this commit:tests/fingerprint: ./fingerprinttest -s -F tyf~tNDupdatetests/module: inet_run_module_tests -m release --no-build -f MIPv6MIPv6_tcp_handoverfailstests/serializer: inet_run_serializer_tests -m release --no-buildserializer_chunk_roundtripfails with 60 failed casestests/unit: inet_run_unit_tests -m release --no-build -f MobilityHeaderSerializer_1The commit was also built in debug mode, with
make MODE=debug -j4at the repository root, intests/module/liband intests/unit/lib, exit 0, with no compiler warning in the changed file. On that buildcd tests/module && inet_run_module_tests -m debug --no-build -l ERROR -f 'MIPv6|PMIPv6'passes 11 of 11,MIPv6_tcp_handoverincluded, andcd tests/unit && inet_run_unit_tests -m debug --no-build -f MobilityHeaderSerializer_1passes, both exit 0.The 62 fingerprint errors are configurations whose optional features are not built (
VoipStreamSender,TcpLwip,Z3GateScheduleConfigurator, the OpenSceneGraph visualizer showcases). Both failures also occur on master.inet_run_statistical_tests -m release -w examples/ipv6/pmipv6, against statistics repository9ab4c26a45, passes. Gates:check-commits.sh origin/master..HEAD,check-classification.sh origin/master..HEAD,check-source-seals.sh --base origin/masterandcheck-architecture.sh src/inet/networklayer/mipv6pass.check-naming.sh --base origin/masterfails on pre-existing directory names, as on master, and finds no changed NED or MSG file. The unscopedcheck-architecture.shandcheck-interfaces.shfail with output identical to master's.Fingerprints: the
/examples/ipv6/pmipv6/fingerprint that hashes packet bytes (~tND) moves frombd46-d85ctodb46-aa59, because one octet of each Proxy Binding Acknowledgement changes. The fingerprint of event times, module paths, message lengths and module-supplied extra data (tplx) and the one of event times, node paths and message lengths of packets between nodes (~tNl) are unchanged. The display-string and canvas-figure fingerprint (tyf), which-F tyfskips, already fails on master:./fingerprinttest -s -m pmipv6 examples.csvgives05f8-fee3against the recorded0277-d784. This commit gives the same value, so the row is left as it is.Not addressed here
The proxy mobility options after the fixed fields are still written back to back without option type and length octets, so Wireshark ends the dissection in a spurious option.
MobilityHeaderSerializer.cc:23declares this as a modelling simplification.